package com.xuetao.spider.util;

import java.util.concurrent.ThreadLocalRandom;

/**
 * @Description
 * @Author xuetao wang
 * @Date 2021/3/31
 */
public class SleepUtils {
    private static int[] times = {200, 300, 400, 500, 600, 700, 400, 300,800, 900, 1000, 1100,1500, 1600, 1800, 1900};

    public static void sleep() {
        int index = ThreadLocalRandom.current().nextInt(times.length);
        try {
            Thread.sleep(times[index]);
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }

}
